package com.ddm.dto;

import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.ddm.entity.Level1;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 丁丁猫
 * @version 1.0
 */
public class Level1DTO extends Level1 {
    protected List<String> imageList;
    protected List<Level2DTO> level2DTO;
    public void setImageList(List<String> images) {
        if (CollectionUtils.isNotEmpty(images)) {
            this.imageList = new ArrayList<>();
            this.imageList.addAll(images);
        }
    }
    public List<String> getImageList() {
        if (CollectionUtils.isNotEmpty(imageList)) {
            return this.imageList;
        } else {
            return null;
        }
    }

    public List<Level2DTO> getLevel2DTO() {
        return level2DTO;
    }
}
